<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
  xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
  xmlns:camunda="http://camunda.org/schema/1.0/bpmn" 
  targetNamespace="Examples">

  <signal id="alertSignal" name="alert" />

  <process id="signalEventSubProcess" isExecutable="true">

    <startEvent id="start" />
    <sequenceFlow sourceRef="start" targetRef="subProcess" />
    
    <subProcess id="subProcess">
      <startEvent id="subProcessStart"/>
      <sequenceFlow sourceRef="subProcessStart" targetRef="subProcessTask" />
      <userTask id="subProcessTask" />
      <sequenceFlow sourceRef="subProcessTask" targetRef="subProcessEnd" />
      <endEvent id="subProcessEnd">
        <signalEventDefinition signalRef="alertSignal" />
      </endEvent>
    </subProcess>
    
    <sequenceFlow sourceRef="subProcess" targetRef="afterSubProcessTask" />
    <userTask id="afterSubProcessTask"/>
    <sequenceFlow sourceRef="afterSubProcessTask" targetRef="end" />
    <endEvent id="end" />

    <subProcess id="eventSubProcess" triggeredByEvent="true">
      <startEvent id="eventSubProcessStart">
        <signalEventDefinition signalRef="alertSignal" />
      </startEvent>
      <sequenceFlow sourceRef="eventSubProcessStart" targetRef="eventSubProcessTask" />
      <userTask id="eventSubProcessTask" />
      <sequenceFlow sourceRef="eventSubProcessTask" targetRef="eventSubProcessEnd" />
      <endEvent id="eventSubProcessEnd" />
    </subProcess>

  </process>

  

</definitions>
